﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class BServerConfig
    {

        private readonly DServerConfig _dServerConfig = new DServerConfig();

        public bool Exists(string servername)
        {        
            return _dServerConfig.Exists(servername);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Model.ServerConfigInfo model)
        {
            return _dServerConfig.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.ServerConfigInfo model)
        {
            return _dServerConfig.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(int id)
        {             
             return _dServerConfig.Delete(id);            
        }
        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string idlist)
        {
            return _dServerConfig.DeleteList(idlist);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.ServerConfigInfo GetModel(int id)
        {
            return _dServerConfig.GetModel(id);            
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.ServerConfigInfo GetModelByName(string servername)
        {
            return _dServerConfig.GetModelByName(servername);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return _dServerConfig.GetList(strWhere);
        }
    }
}
